import React from 'react';

const foo = (Cmp) => (props) => {
  return (
    <div className="foo">
      <Cmp {...props}></Cmp>
    </div>
  );
};

function Child(props) {
  return <div className="child">child-{props.name}</div>;
}

const Foo = foo(Child);

export default function HocPage() {
  return (
    <div>
      <h3>HocPage</h3>
      <Foo name="test" />
    </div>
  );
}
